from version import VERSION

from rest_framework.viewsets import GenericViewSet
from rest_framework.decorators import action,authentication_classes
from rest_framework.response import Response

class MainViewSet(GenericViewSet):
    
    @action(detail=False, methods=['get'],permission_classes=[])
    def version(self,request):
        # allow no login
        return Response({'version':VERSION})
    